/*
 * =====================================================================================
 *
 *       Filename:  string.h
 *
 *    Description:  常见的string函数
 *
 *        Version:  1.0
 *        Created:  2014年12月3日
 *       Revision:  none
 *       Compiler:  gcc
 *      Copyright:  本库参照互联网相关程序制作，未经作者同意，不可用于商业用途,违者必究
 *                  如有问题，可联系作者：凯撒大帝，mgrgfkjswust@163.com
 *
 *
 *         Author:  maguorong,banana family 
 *        Company:  Xidian University
 *            log:  2014.4 修改bug若干，还未测试
 *
 * =====================================================================================
 */
#ifndef INCLUDE_STRING_H_
#define INCLUDE_STRING_H_ 
 
#include "type.h"

 int ba_strlen(const char *s);
 
 char ba_tolower(const char u);
 
 char *ba_strtolower(const char *u,char *ret);
 
 char ba_toupper(const char u);
 
 char *ba_strtoupper(const char *u,char *ret);
 
 int ba_strnlen(const char *s,int num);

 char *ba_strcpy(char *dest, const char *src);

 char *ba_strncpy(char *dest, const char *src, unsigned int  count);

 char *ba_strcat(char *dest, const char *src);

 char *ba_strncat(char *dest, const char *src, int count);

 int ba_strcmp(const char *cs, const char *ct);
 
 int ba_strncmp(const char *cs, const char *ct,unsigned int count);

 int ba_strfidchr(const char *s,const char c);

 int ba_strfidchrnum(const char *s, const char c);

 int ba_memcmp(const void *cs, const void *ct, unsigned int count);

 void *ba_memcpy(void *dest, const void *src, unsigned int count);
 
 //char *ba_memmove(char *dest , const char *src , unsigned int size); 

 void *ba_memmove (void * dst,const void * src,unsigned int count);


 char *ba_strstr(const char *s1, const char *s2);

 char *ba_strnstr(const char *s1, const char *s2, unsigned int len);
 
 #endif